using System.ComponentModel.DataAnnotations;

namespace EIMS.Models.AccountViewModels
{
    public class ProfileViewModel
    {
        [Required(ErrorMessage = "用户名不能为空")]
        [Display(Name = "用户名")]
        public string Username { get; set; }

        [Required(ErrorMessage = "显示名称不能为空")]
        [Display(Name = "显示名称")]
        [StringLength(50, ErrorMessage = "{0}的长度必须在{2}到{1}个字符之间。", MinimumLength = 2)]
        public string DisplayName { get; set; }

        [Required(ErrorMessage = "电子邮箱不能为空")]
        [EmailAddress(ErrorMessage = "电子邮箱格式不正确")]
        [Display(Name = "电子邮箱")]
        public string Email { get; set; }

        [Display(Name = "职位")]
        [StringLength(100)]
        public string JobTitle { get; set; }

        [Display(Name = "手机号码")]
        [Phone(ErrorMessage = "手机号码格式不正确")]
        [StringLength(20)]
        public string PhoneNumber { get; set; }

        [Display(Name = "注册时间")]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd HH:mm}", ApplyFormatInEditMode = false)]
        public DateTime? CreatedDate { get; set; }

        [Display(Name = "最后登录时间")]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd HH:mm}", ApplyFormatInEditMode = false)]
        public DateTime? LastLoginDate { get; set; }
    }
} 